This invention relates to an image encoding system in which a motion compensation prediction, typically such as MPEG 2 or the like, is used.
The conventional image encoding technique will be described with reference to the drawing. FIG. 11 is a block diagram showing a construction of an image encoder which uses a motion compensation prediction, for example, which is performed in an MPEG2 or the like.
In FIG. 11, reference numeral 300 denotes an image encoder; 301 an input terminal; 302 a subtracter; 303 a discrete cosine transformer (DCT); 304 a quantizer; 305 quantized data; 306 a variable length encoder; 307 variable length encoded data; 308 an inverse quantizer; 309 an inverse discrete cosine transformer (IDCT); 310 an adder; 311 a frame memory; 312 motion compensation prediction image data (reference image); further, 320 a motion detecting unit; 321 a motion vector value; and 322 a motion compensation predicting unit.
The operation of the above image encoder will now be described with reference to the drawing. FIG. 12 is a diagram showing a motion detecting range of the above conventional image encoder.
The image encoder 300, fundamentally, processes image data of one frame on a macro block unit basis. In FIG. 11, image data of one macro block of (16 pixelsxc3x9716 lines) is inputted from the input terminal 301 and a difference between the inputted data and the reference image 312 to which a motion compensation prediction is performed is obtained by the subtracter 302. Discrete cosine transformation is performed by the discrete cosine transformer (DCT) 303 and the resultant data is quantized by the quantizer 304, thereby obtaining the quantized data 305. Subsequently, the variable length encoding of the quantized data 305 is executed by the variable length encoder 306 and the variable length encoded data 307 is transmitted.
The quantized data 305 is inversely quantized by the inverse quantizer 308, inverse discrete transformed by the inverse discrete cosine transformer (IDCT) 309, added to the reference image 312 to which the motion compensation prediction has been performed by the adder 310, and stored into the frame memory 311.
In the motion detecting unit 320, a motion detection is performed by the data from the frame memory 311 and the macro block data from the input terminal 301, thereby obtaining the motion vector 321. The motion compensation predicting unit 322 performs a motion compensation prediction on the basis of the motion vector 321. Further, the motion vector 321 is transmitted to the variable length encoder 306, variable length encoded, and transmitted as variable length encoded data 307.
FIG. 12 is a diagram showing a retrieving range of the conventional image encoder. In this figure, reference numeral 330 denotes a retrieved range; and 331 a final obtained motion vector.
The conventional image encoder has an extremely large amount of arithmetic operation in the motion detecting unit 320. In order to cope with an image having a large motion, it is necessary to make the retrieving range of the motion widened. When the retrieving range is widened, the amount of arithmetic operation increases according to the size of retrieving range. Recently, as compared with the present SDTV image, encoding of an HDTV image having a high resolution has often been performed. It is, however, necessary that the retrieving range is more widened as a higher resolution.
If those encoding processes are tried to realize in one chip, it is needed that an amount of arithmetic operation is reduced in the motion detecting unit 320. Therefore, when the retrieving range of the motion is intended to widen, it is necessary that precision of arithmetic operation is set to be low by decimating pixels or the like. The accurate motion cannot always be detected.
With respect to an image of pan of a camera or the like, almost the same detection result is obtained every macro block. It is sufficient to retrieve only an area peripheral to the pan of the camera. However, the whole retrieving range has been actually retrieved and there is a problem that the useless arithmetic operation is needed.
This invention has been made to solve the above mentioned problems. It is an object to acquire an image encoding system in which the amount of arithmetic operation by the motion detection can be reduced.
An image encoding system according to the present invention comprises: a global motion detecting unit for detecting a motion in the whole picture screen between a reduction image of a present frame and a reduction image of a reference frame and for outputting global motion information; and an image encoding unit for performing a motion detection within the peripheral narrow retrieving range on the basis of the global motion information and for encoding an image by using a motion compensation prediction.
In an image encoding system according to the present invention, the global motion detecting unit comprises: a first image reducing unit for reducing an image of the present frame; a second image reducing unit for reducing an image of the reference frame; and a motion detecting unit for performing a global motion detection between the reduction image of the present frame and the reduction image of the reference frame.
In an image encoding system according to the present invention, the first and second image reducing units filter an image of xe2x80x9caxe2x80x9d pixels in the horizontal direction and xe2x80x9cbxe2x80x9d lines in the vertical direction (a, b: integers), perform a sub-sampling thereafter, and form data of one pixel, thereby performing an image reduction.
Moreover, in an image encoding system according to the present invention, the motion detecting unit performs the global motion detection, detects a partial motion of the picture screen between the reduction image of the present frame and the reduction image of the reference image, and outputs local motion information, and the global motion detecting unit further has a macro block motion deciding unit for selecting optimum motion information in a present macro block from the detected global motion information and the detected local motion information and for outputting the selected information to the image encoding unit as macro block motion information.
In an image encoding system according to the present invention, the global motion detecting unit comprises: an image reducing unit for reducing an input image; a reduction image frame memory for storing the reduced image as much as at least two or more frames; a selector for extracting the reduction image of the present frame and the reduction image of the reference frame out of the reduction images stored in the reduction image frame memory; and a motion detecting unit for performing a global motion detection between the reduction image of the present frame and the reduction image of the reference frame.
In an image encoding system according to the present invention, the image reducing unit filters an image of xe2x80x9caxe2x80x9d pixels in the horizontal direction and xe2x80x9cbxe2x80x9d lines in the vertical direction (a, b: integers), performs a sub-sampling after that, and forms data of one pixel, thereby performing an image reduction.
Moreover, in an image encoding system according to the present invention, the motion detecting unit performs the global motion detection, detects a partial motion of the picture screen between the reduction image of the present frame and the reduction image of the reference frame, and outputs local motion information, and the global motion detecting unit further has a macro block motion deciding unit for selecting optimum motion information in a present macro block from the detected global motion information and the detected local motion information and for outputting the selected information to the image encoding unit as macro block motion information.